/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * jifIMSS.java
 *
 * Created on 14/03/2011, 02:41:06 PM
 */

package ImssForm;

import Utilidades.limitador;
import Utilidades.Acciones_Imss;
import bd_imss.Citas;
import bd_imss.Clinicas;
import bd_imss.Consultorios;
import bd_imss.Medicos;
import bd_imss.Pacientes;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.RollbackException;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import org.jdesktop.application.Action;
import org.jdesktop.application.Task;
import org.jdesktop.beansbinding.AbstractBindingListener;
import org.jdesktop.beansbinding.Binding;
import org.jdesktop.beansbinding.PropertyStateEvent;



/**
 *
 * @author Earving
 */
public class jifIMSS extends javax.swing.JInternalFrame {

    private String idPaciente, idCC, idConC;
    private boolean n = false,n2=false,n3=false,n4=false, n5=false;

    /** Creates new form jifIMSS */
    public jifIMSS() {
        initComponents();
        initListenersPaciente();
        initListenersCita();
        initListenersClinica();
        initListenersConsultorios();
        initListenersMedicos();
        panelesVisibles();
        comboboxIndex();
        jtaObservaciones.setDocument(new limitador(200));
        emImss.getTransaction().begin();
        botonesHabilitados();
        validadorNumeros(txtEdad);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class).getContext().getResourceMap(jifIMSS.class);
        emImss = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(resourceMap.getString("emImss.persistenceUnit")).createEntityManager(); // NOI18N
        queryPacientes = java.beans.Beans.isDesignTime() ? null : emImss.createQuery(resourceMap.getString("queryPacientes.query")); // NOI18N
        listPacientes = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryPacientes.getResultList());
        db_proyect_pruebasPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory("db_proyect_pruebasPU").createEntityManager();
        generosQuery = java.beans.Beans.isDesignTime() ? null : db_proyect_pruebasPUEntityManager.createQuery("SELECT g FROM Generos g");
        generosList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : generosQuery.getResultList();
        clinicasQuery = java.beans.Beans.isDesignTime() ? null : db_proyect_pruebasPUEntityManager.createQuery("SELECT c FROM Clinicas c");
        clinicasList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : clinicasQuery.getResultList();
        renderGeneros1 = new Utilidades.RenderGeneros();
        rendererClinicas1 = new Utilidades.RendererClinicas();
        pacientes1 = new bd_imss.Pacientes();
        renderPacientes1 = new Utilidades.RenderPacientes();
        consultoriosQuery = java.beans.Beans.isDesignTime() ? null : db_proyect_pruebasPUEntityManager.createQuery("SELECT c FROM Consultorios c");
        consultoriosList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : consultoriosQuery.getResultList();
        renderConsultorios1 = new Utilidades.RenderConsultorios();
        medicosQuery = java.beans.Beans.isDesignTime() ? null : emImss.createQuery("SELECT m FROM Medicos m");
        medicosList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(medicosQuery.getResultList());
        renderMedicos1 = new Utilidades.RenderMedicos();
        queryCitas = java.beans.Beans.isDesignTime() ? null : emImss.createQuery(resourceMap.getString("queryCitas.query")); // NOI18N
        listCitas = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryCitas.getResultList());
        medicos1 = new bd_imss.Medicos();
        consultorios1 = new bd_imss.Consultorios();
        queryClinicas2 = java.beans.Beans.isDesignTime() ? null : emImss.createQuery(resourceMap.getString("queryClinicas2.query")); // NOI18N
        listClinicas2 = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryClinicas2.getResultList());
        queryConsultorios = java.beans.Beans.isDesignTime() ? null : emImss.createQuery(resourceMap.getString("queryConsultorios.query")); // NOI18N
        listConsultorios = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : org.jdesktop.observablecollections.ObservableCollections.observableList(queryConsultorios.getResultList());
        turnoQuery = java.beans.Beans.isDesignTime() ? null : emImss.createQuery("SELECT t FROM Turno t");
        turnoList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : turnoQuery.getResultList();
        renderTurnos1 = new Utilidades.RenderTurnos();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtPacientes = new javax.swing.JTable();
        jPanel5 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jdcFechaNac = new com.toedter.calendar.JDateChooser();
        jLabel2 = new javax.swing.JLabel();
        jdcFechaIng = new com.toedter.calendar.JDateChooser();
        jcbGenero = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        cboClinica = new javax.swing.JComboBox();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        txtEdad = new javax.swing.JTextField();
        txtTelefono = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        btnActualizar = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jLabel12 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel7 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        cboPacientes = new javax.swing.JComboBox();
        jPanel10 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jDateChooser3 = new com.toedter.calendar.JDateChooser();
        jLabel15 = new javax.swing.JLabel();
        jTextFieldDateEditor3 = new com.toedter.calendar.JTextFieldDateEditor();
        jLabel16 = new javax.swing.JLabel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jtaObservaciones = new javax.swing.JTextArea();
        jLabel18 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        cboClinicaCita = new javax.swing.JComboBox();
        cboConsultorioCita = new javax.swing.JComboBox();
        jLabel24 = new javax.swing.JLabel();
        cboMedicos = new javax.swing.JComboBox();
        jPanel11 = new javax.swing.JPanel();
        btnAgregarCita = new javax.swing.JButton();
        jLabel26 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtCitas = new javax.swing.JTable();
        jPanel13 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        cboPacienteReg = new javax.swing.JComboBox();
        jLabel19 = new javax.swing.JLabel();
        jdcFechaCita = new com.toedter.calendar.JDateChooser();
        jLabel20 = new javax.swing.JLabel();
        tfdHoraCita = new com.toedter.calendar.JTextFieldDateEditor();
        jScrollPane5 = new javax.swing.JScrollPane();
        txtAObs = new javax.swing.JTextArea();
        jLabel21 = new javax.swing.JLabel();
        cboClinicaMod = new javax.swing.JComboBox();
        cboConsMod = new javax.swing.JComboBox();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        cboMedicosMod = new javax.swing.JComboBox();
        jPanel14 = new javax.swing.JPanel();
        btnEliminarCita = new javax.swing.JButton();
        btnGCambCitas = new javax.swing.JButton();
        btnRCamCitas = new javax.swing.JButton();
        jLabel27 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jTabbedPane3 = new javax.swing.JTabbedPane();
        jPanel15 = new javax.swing.JPanel();
        jpClinicas = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtClinicas = new javax.swing.JTable();
        jpAccionesClinicas = new javax.swing.JPanel();
        btnAgregarClinica = new javax.swing.JButton();
        btnEliminarClinica = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        btnRefreshClinicas = new javax.swing.JButton();
        jLabel28 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jpConsultorios = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        jtConsultorios = new javax.swing.JTable();
        jPanel17 = new javax.swing.JPanel();
        btnAgregarCons = new javax.swing.JButton();
        btnEliminarCons = new javax.swing.JButton();
        btnGuardarCons = new javax.swing.JButton();
        btnRefreshCons = new javax.swing.JButton();
        jpDatosConsult = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        cboClinicasCons = new javax.swing.JComboBox();
        jLabel29 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jtMedicos = new javax.swing.JTable();
        jpDatosMedicos = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        txtEspecialidad = new javax.swing.JTextField();
        jLabel9 = new javax.swing.JLabel();
        jComboBox1 = new javax.swing.JComboBox();
        jLabel10 = new javax.swing.JLabel();
        jComboBox2 = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jComboBox3 = new javax.swing.JComboBox();
        jPanel20 = new javax.swing.JPanel();
        btnAgregarMedico = new javax.swing.JButton();
        btnEliminarMedico = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        btnRefreshMedico = new javax.swing.JButton();
        jLabel30 = new javax.swing.JLabel();

        renderGeneros1.setText(resourceMap.getString("renderGeneros1.text")); // NOI18N
        renderGeneros1.setName("renderGeneros1"); // NOI18N

        rendererClinicas1.setText(resourceMap.getString("rendererClinicas1.text")); // NOI18N
        rendererClinicas1.setName("rendererClinicas1"); // NOI18N

        renderPacientes1.setText(resourceMap.getString("renderPacientes1.text")); // NOI18N
        renderPacientes1.setName("renderPacientes1"); // NOI18N

        renderConsultorios1.setText(resourceMap.getString("renderConsultorios1.text")); // NOI18N
        renderConsultorios1.setName("renderConsultorios1"); // NOI18N

        renderMedicos1.setText(resourceMap.getString("renderMedicos1.text")); // NOI18N
        renderMedicos1.setName("renderMedicos1"); // NOI18N

        renderTurnos1.setText(resourceMap.getString("renderTurnos1.text")); // NOI18N
        renderTurnos1.setName("renderTurnos1"); // NOI18N

        setBorder(null);
        setClosable(true);
        setMaximizable(true);
        setResizable(true);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setFrameIcon(resourceMap.getIcon("Form.frameIcon")); // NOI18N
        setName("Form"); // NOI18N

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N

        jPanel1.setName("jPanel1"); // NOI18N

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel4.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel4.border.titleFont"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jtPacientes.setName("jtPacientes"); // NOI18N

        org.jdesktop.swingbinding.JTableBinding jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPacientes, jtPacientes);
        org.jdesktop.swingbinding.JTableBinding.ColumnBinding columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${numSS}"));
        columnBinding.setColumnName("Num SS");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${curp}"));
        columnBinding.setColumnName("Curp");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombre}"));
        columnBinding.setColumnName("Nombre");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${app}"));
        columnBinding.setColumnName("App");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apm}"));
        columnBinding.setColumnName("Apm");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${tipoSangre}"));
        columnBinding.setColumnName("Tipo Sangre");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane1.setViewportView(jtPacientes);
        jtPacientes.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jtPacientes.columnModel.title0")); // NOI18N
        jtPacientes.getColumnModel().getColumn(1).setHeaderValue(resourceMap.getString("jtPacientes.columnModel.title1")); // NOI18N
        jtPacientes.getColumnModel().getColumn(2).setHeaderValue(resourceMap.getString("jtPacientes.columnModel.title2")); // NOI18N
        jtPacientes.getColumnModel().getColumn(3).setHeaderValue(resourceMap.getString("jtPacientes.columnModel.title3")); // NOI18N
        jtPacientes.getColumnModel().getColumn(4).setHeaderValue(resourceMap.getString("jtPacientes.columnModel.title4")); // NOI18N
        jtPacientes.getColumnModel().getColumn(5).setHeaderValue(resourceMap.getString("jtPacientes.columnModel.title5")); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 787, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(14, Short.MAX_VALUE))
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel5.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel5.border.titleFont"))); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jPanel5.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(309, 69, -1, -1));

        jdcFechaNac.setName("jdcFechaNac"); // NOI18N

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPacientes, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.fechaNac}"), jdcFechaNac, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        jPanel5.add(jdcFechaNac, new org.netbeans.lib.awtextra.AbsoluteConstraints(123, 31, 115, -1));

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        jPanel5.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 69, -1, -1));

        jdcFechaIng.setName("jdcFechaIng"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPacientes, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.fechaIng}"), jdcFechaIng, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        jPanel5.add(jdcFechaIng, new org.netbeans.lib.awtextra.AbsoluteConstraints(122, 69, 116, -1));

        jcbGenero.setName("jcbGenero"); // NOI18N
        jcbGenero.setRenderer(renderGeneros1);

        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, generosList, jcbGenero);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPacientes, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.generos}"), jcbGenero, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jPanel5.add(jcbGenero, new org.netbeans.lib.awtextra.AbsoluteConstraints(350, 70, 96, -1));

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        jPanel5.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 31, -1, -1));

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N
        jPanel5.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(309, 107, -1, -1));

        cboClinica.setName("cboClinica"); // NOI18N
        cboClinica.setRenderer(rendererClinicas1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listClinicas2, cboClinica);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPacientes, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.clinicas}"), cboClinica, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jPanel5.add(cboClinica, new org.netbeans.lib.awtextra.AbsoluteConstraints(358, 107, 140, -1));

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N
        jPanel5.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 107, -1, -1));

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N
        jPanel5.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(16, 149, -1, -1));

        txtEdad.setName("txtEdad"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPacientes, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.edad}"), txtEdad, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        txtEdad.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyTyped(java.awt.event.KeyEvent evt) {
                txtEdadKeyTyped(evt);
            }
        });
        jPanel5.add(txtEdad, new org.netbeans.lib.awtextra.AbsoluteConstraints(122, 107, 59, -1));

        txtTelefono.setName("txtTelefono"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtPacientes, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.telefono}"), txtTelefono, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jPanel5.add(txtTelefono, new org.netbeans.lib.awtextra.AbsoluteConstraints(122, 145, 116, -1));

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel6.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel6.border.titleFont"))); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class).getContext().getActionMap(jifIMSS.class, this);
        btnActualizar.setAction(actionMap.get("actualizarDatos")); // NOI18N
        btnActualizar.setText(resourceMap.getString("btnActualizar.text")); // NOI18N
        btnActualizar.setName("btnActualizar"); // NOI18N

        jButton1.setAction(actionMap.get("eliminarPaciente")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N

        jButton2.setAction(actionMap.get("guardarRegistro")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N

        jButton3.setAction(actionMap.get("registrarPaciente")); // NOI18N
        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnActualizar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(24, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnActualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jLabel12.setIcon(resourceMap.getIcon("jLabel12.icon")); // NOI18N
        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 506, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 183, Short.MAX_VALUE)
                        .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)
                .addComponent(jLabel12)
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel1.TabConstraints.tabTitle"), jPanel1); // NOI18N

        jPanel3.setName("jPanel3"); // NOI18N

        jTabbedPane2.setName("jTabbedPane2"); // NOI18N

        jPanel7.setName("jPanel7"); // NOI18N

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel9.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel9.border.titleFont"))); // NOI18N
        jPanel9.setName("jPanel9"); // NOI18N

        cboPacientes.setAction(actionMap.get("guardarIdPaciente")); // NOI18N
        cboPacientes.setName("cboPacientes"); // NOI18N
        cboPacientes.setRenderer(renderPacientes1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPacientes, cboPacientes);
        bindingGroup.addBinding(jComboBoxBinding);

        cboPacientes.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cboPacientesItemStateChanged(evt);
            }
        });

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cboPacientes, 0, 138, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(cboPacientes, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel10.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel10.border.titleFont"))); // NOI18N
        jPanel10.setName("jPanel10"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jDateChooser3.setName("jDateChooser3"); // NOI18N

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jTextFieldDateEditor3.setDateFormatString(resourceMap.getString("jTextFieldDateEditor3.dateFormatString")); // NOI18N
        jTextFieldDateEditor3.setMaskVisible(true);
        jTextFieldDateEditor3.setName("jTextFieldDateEditor3"); // NOI18N

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jtaObservaciones.setColumns(20);
        jtaObservaciones.setRows(5);
        jtaObservaciones.setName("jtaObservaciones"); // NOI18N
        jScrollPane4.setViewportView(jtaObservaciones);

        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        cboClinicaCita.setName("cboClinicaCita"); // NOI18N
        cboClinicaCita.setRenderer(rendererClinicas1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listClinicas2, cboClinicaCita);
        bindingGroup.addBinding(jComboBoxBinding);

        cboClinicaCita.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cboClinicaCitaItemStateChanged(evt);
            }
        });

        cboConsultorioCita.setName("cboConsultorioCita"); // NOI18N
        cboConsultorioCita.setRenderer(renderConsultorios1);

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedItem.consultoriosList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboClinicaCita, eLProperty, cboConsultorioCita);
        bindingGroup.addBinding(jComboBoxBinding);

        cboConsultorioCita.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                cboConsultorioCitaItemStateChanged(evt);
            }
        });

        jLabel24.setText(resourceMap.getString("jLabel24.text")); // NOI18N
        jLabel24.setName("jLabel24"); // NOI18N

        cboMedicos.setName("cboMedicos"); // NOI18N
        cboMedicos.setRenderer(renderMedicos1);

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedItem.medicosList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboConsultorioCita, eLProperty, cboMedicos);
        bindingGroup.addBinding(jComboBoxBinding);

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel16)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79, Short.MAX_VALUE)
                        .addComponent(jLabel18)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboConsultorioCita, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addComponent(jLabel15)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldDateEditor3, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addComponent(jLabel14)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jDateChooser3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(99, 99, 99)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel17)
                            .addComponent(jLabel24))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cboMedicos, 0, 202, Short.MAX_VALUE)
                            .addComponent(cboClinicaCita, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cboClinicaCita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel14)
                            .addComponent(jDateChooser3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(34, 34, 34)
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel15)
                                .addComponent(jTextFieldDateEditor3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(cboMedicos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel17)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jLabel24)))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel18)
                            .addComponent(cboConsultorioCita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(21, 21, 21)
                        .addComponent(jLabel16))
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(20, 20, 20))
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel11.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel11.border.titleFont"))); // NOI18N
        jPanel11.setName("jPanel11"); // NOI18N

        btnAgregarCita.setText(resourceMap.getString("btnAgregarCita.text")); // NOI18N
        btnAgregarCita.setName("btnAgregarCita"); // NOI18N
        btnAgregarCita.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAgregarCitaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnAgregarCita)
                .addContainerGap())
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addComponent(btnAgregarCita, javax.swing.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)
                .addContainerGap())
        );

        jLabel26.setIcon(null);
        jLabel26.setName("jLabel26"); // NOI18N

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 227, Short.MAX_VALUE)
                        .addComponent(jLabel26)
                        .addContainerGap())
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGap(75, 75, 75)
                        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18)
                                .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, 314, Short.MAX_VALUE))
                            .addComponent(jLabel26, javax.swing.GroupLayout.Alignment.TRAILING))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(145, 145, 145))))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel7.TabConstraints.tabTitle"), jPanel7); // NOI18N

        jPanel8.setName("jPanel8"); // NOI18N

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel12.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel12.border.titleFont"))); // NOI18N
        jPanel12.setName("jPanel12"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jtCitas.setToolTipText(resourceMap.getString("jtCitas.toolTipText")); // NOI18N
        jtCitas.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
        jtCitas.setName("jtCitas"); // NOI18N

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listCitas, jtCitas);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${idCitas}"));
        columnBinding.setColumnName("Id Citas");
        columnBinding.setColumnClass(Integer.class);
        columnBinding.setEditable(false);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane2.setViewportView(jtCitas);
        jtCitas.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jtCitas.columnModel.title0")); // NOI18N

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(34, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(31, Short.MAX_VALUE))
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel13.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel13.border.titleFont"))); // NOI18N
        jPanel13.setName("jPanel13"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        cboPacienteReg.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        cboPacienteReg.setEnabled(false);
        cboPacienteReg.setFocusable(false);
        cboPacienteReg.setName("cboPacienteReg"); // NOI18N
        cboPacienteReg.setRenderer(renderPacientes1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listPacientes, cboPacienteReg);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtCitas, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.pacientes}"), cboPacienteReg, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jdcFechaCita.setName("jdcFechaCita"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtCitas, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.fecha}"), jdcFechaCita, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        jLabel20.setText(resourceMap.getString("jLabel20.text")); // NOI18N
        jLabel20.setName("jLabel20"); // NOI18N

        tfdHoraCita.setDateFormatString(resourceMap.getString("tfdHoraCita.dateFormatString")); // NOI18N
        tfdHoraCita.setMaskVisible(true);
        tfdHoraCita.setName("tfdHoraCita"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtCitas, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.hora}"), tfdHoraCita, org.jdesktop.beansbinding.BeanProperty.create("date"));
        bindingGroup.addBinding(binding);

        jScrollPane5.setName("jScrollPane5"); // NOI18N

        txtAObs.setColumns(20);
        txtAObs.setRows(5);
        txtAObs.setName("txtAObs"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtCitas, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.observaciones}"), txtAObs, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jScrollPane5.setViewportView(txtAObs);

        jLabel21.setText(resourceMap.getString("jLabel21.text")); // NOI18N
        jLabel21.setName("jLabel21"); // NOI18N

        cboClinicaMod.setName("cboClinicaMod"); // NOI18N
        cboClinicaMod.setRenderer(rendererClinicas1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listClinicas2, cboClinicaMod);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtCitas, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.clinicas}"), cboClinicaMod, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        binding.setSourceNullValue(null);
        binding.setSourceUnreadableValue(null);
        bindingGroup.addBinding(binding);

        cboConsMod.setName("cboConsMod"); // NOI18N
        cboConsMod.setRenderer(renderConsultorios1);

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedItem.consultoriosList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboClinicaMod, eLProperty, cboConsMod);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtCitas, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.consultorios}"), cboConsMod, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        binding.setSourceNullValue(null);
        binding.setSourceUnreadableValue(null);
        bindingGroup.addBinding(binding);

        jLabel22.setText(resourceMap.getString("jLabel22.text")); // NOI18N
        jLabel22.setName("jLabel22"); // NOI18N

        jLabel23.setText(resourceMap.getString("jLabel23.text")); // NOI18N
        jLabel23.setName("jLabel23"); // NOI18N

        jLabel25.setText(resourceMap.getString("jLabel25.text")); // NOI18N
        jLabel25.setName("jLabel25"); // NOI18N

        cboMedicosMod.setName("cboMedicosMod"); // NOI18N
        cboMedicosMod.setRenderer(renderMedicos1);

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${selectedItem.medicosList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cboConsMod, eLProperty, cboMedicosMod);
        jComboBoxBinding.setSourceNullValue(medicosList);
        jComboBoxBinding.setSourceUnreadableValue(medicosList);
        bindingGroup.addBinding(jComboBoxBinding);

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cboPacienteReg, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel21)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jdcFechaCita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addComponent(jLabel20)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(tfdHoraCita, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel23)
                    .addComponent(jLabel22)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(cboMedicosMod, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(cboClinicaMod, 0, 168, Short.MAX_VALUE)
                    .addComponent(cboConsMod, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(48, Short.MAX_VALUE))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel13)
                        .addComponent(cboPacienteReg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(cboClinicaMod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jLabel22)))
                .addGap(28, 28, 28)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addGap(11, 11, 11)
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(cboConsMod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel23))
                        .addGap(34, 34, 34)
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel25)
                            .addComponent(cboMedicosMod, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel19)
                            .addComponent(jdcFechaCita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel20)
                            .addComponent(tfdHoraCita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel13Layout.createSequentialGroup()
                                .addGap(33, 33, 33)
                                .addComponent(jLabel21))
                            .addGroup(jPanel13Layout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(66, 66, 66))
        );

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel14.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel14.border.titleFont"))); // NOI18N
        jPanel14.setName("jPanel14"); // NOI18N

        btnEliminarCita.setAction(actionMap.get("eliminarCita")); // NOI18N
        btnEliminarCita.setText(resourceMap.getString("btnEliminarCita.text")); // NOI18N
        btnEliminarCita.setName("btnEliminarCita"); // NOI18N

        btnGCambCitas.setAction(actionMap.get("guardarCambios")); // NOI18N
        btnGCambCitas.setText(resourceMap.getString("btnGCambCitas.text")); // NOI18N
        btnGCambCitas.setName("btnGCambCitas"); // NOI18N

        btnRCamCitas.setAction(actionMap.get("actualizarDatosCita")); // NOI18N
        btnRCamCitas.setText(resourceMap.getString("btnRCamCitas.text")); // NOI18N
        btnRCamCitas.setName("btnRCamCitas"); // NOI18N

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGap(28, 28, 28)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnRCamCitas)
                            .addComponent(btnEliminarCita)))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(btnGCambCitas)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                .addComponent(btnEliminarCita, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(btnGCambCitas, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnRCamCitas, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(11, 11, 11))
        );

        jLabel27.setIcon(null);
        jLabel27.setName("jLabel27"); // NOI18N

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(jLabel27, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGap(29, 29, 29)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, 348, Short.MAX_VALUE)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel27)
                .addGap(11, 11, 11))
        );

        jTabbedPane2.addTab(resourceMap.getString("jPanel8.TabConstraints.tabTitle"), jPanel8); // NOI18N

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 819, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane2)
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jTabbedPane3.setName("jTabbedPane3"); // NOI18N

        jPanel15.setName("jPanel15"); // NOI18N

        jpClinicas.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpClinicas.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpClinicas.border.titleFont"))); // NOI18N
        jpClinicas.setName("jpClinicas"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jtClinicas.setName("jtClinicas"); // NOI18N

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listClinicas2, jtClinicas);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombre}"));
        columnBinding.setColumnName("Nombre");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${estado}"));
        columnBinding.setColumnName("Estado");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${municipio}"));
        columnBinding.setColumnName("Municipio");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${direccion}"));
        columnBinding.setColumnName("Direccion");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane3.setViewportView(jtClinicas);

        javax.swing.GroupLayout jpClinicasLayout = new javax.swing.GroupLayout(jpClinicas);
        jpClinicas.setLayout(jpClinicasLayout);
        jpClinicasLayout.setHorizontalGroup(
            jpClinicasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpClinicasLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 567, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpClinicasLayout.setVerticalGroup(
            jpClinicasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpClinicasLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(21, Short.MAX_VALUE))
        );

        jpAccionesClinicas.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpAccionesClinicas.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpAccionesClinicas.border.titleFont"))); // NOI18N
        jpAccionesClinicas.setName("jpAccionesClinicas"); // NOI18N

        btnAgregarClinica.setAction(actionMap.get("agregarClinica")); // NOI18N
        btnAgregarClinica.setText(resourceMap.getString("btnAgregarClinica.text")); // NOI18N
        btnAgregarClinica.setName("btnAgregarClinica"); // NOI18N

        btnEliminarClinica.setAction(actionMap.get("eliminarClinica")); // NOI18N
        btnEliminarClinica.setText(resourceMap.getString("btnEliminarClinica.text")); // NOI18N
        btnEliminarClinica.setName("btnEliminarClinica"); // NOI18N

        jButton4.setAction(actionMap.get("guardarClinica")); // NOI18N
        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N

        btnRefreshClinicas.setAction(actionMap.get("refreshClinicas")); // NOI18N
        btnRefreshClinicas.setText(resourceMap.getString("btnRefreshClinicas.text")); // NOI18N
        btnRefreshClinicas.setName("btnRefreshClinicas"); // NOI18N

        javax.swing.GroupLayout jpAccionesClinicasLayout = new javax.swing.GroupLayout(jpAccionesClinicas);
        jpAccionesClinicas.setLayout(jpAccionesClinicasLayout);
        jpAccionesClinicasLayout.setHorizontalGroup(
            jpAccionesClinicasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpAccionesClinicasLayout.createSequentialGroup()
                .addGroup(jpAccionesClinicasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpAccionesClinicasLayout.createSequentialGroup()
                        .addGap(58, 58, 58)
                        .addComponent(btnRefreshClinicas))
                    .addGroup(jpAccionesClinicasLayout.createSequentialGroup()
                        .addGap(39, 39, 39)
                        .addComponent(jButton4))
                    .addGroup(jpAccionesClinicasLayout.createSequentialGroup()
                        .addGap(59, 59, 59)
                        .addGroup(jpAccionesClinicasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnAgregarClinica)
                            .addComponent(btnEliminarClinica))))
                .addContainerGap(46, Short.MAX_VALUE))
        );
        jpAccionesClinicasLayout.setVerticalGroup(
            jpAccionesClinicasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpAccionesClinicasLayout.createSequentialGroup()
                .addComponent(btnAgregarClinica, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEliminarClinica, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRefreshClinicas, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(22, Short.MAX_VALUE))
        );

        jLabel28.setIcon(null);
        jLabel28.setName("jLabel28"); // NOI18N

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jpAccionesClinicas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel15Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jpClinicas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 183, Short.MAX_VALUE)
                .addComponent(jLabel28)
                .addContainerGap())
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpClinicas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jpAccionesClinicas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()
                .addContainerGap(400, Short.MAX_VALUE)
                .addComponent(jLabel28)
                .addContainerGap())
        );

        jTabbedPane3.addTab(resourceMap.getString("jPanel15.TabConstraints.tabTitle"), jPanel15); // NOI18N

        jPanel16.setName("jPanel16"); // NOI18N

        jpConsultorios.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpConsultorios.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpConsultorios.border.titleFont"))); // NOI18N
        jpConsultorios.setName("jpConsultorios"); // NOI18N

        jScrollPane6.setName("jScrollPane6"); // NOI18N

        jtConsultorios.setName("jtConsultorios"); // NOI18N

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listConsultorios, jtConsultorios);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${numConsultorio}"));
        columnBinding.setColumnName("Num Consultorio");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane6.setViewportView(jtConsultorios);
        jtConsultorios.getColumnModel().getColumn(0).setHeaderValue(resourceMap.getString("jtConsultorios.columnModel.title0")); // NOI18N

        javax.swing.GroupLayout jpConsultoriosLayout = new javax.swing.GroupLayout(jpConsultorios);
        jpConsultorios.setLayout(jpConsultoriosLayout);
        jpConsultoriosLayout.setHorizontalGroup(
            jpConsultoriosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpConsultoriosLayout.createSequentialGroup()
                .addGap(35, 35, 35)
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(52, Short.MAX_VALUE))
        );
        jpConsultoriosLayout.setVerticalGroup(
            jpConsultoriosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpConsultoriosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(19, Short.MAX_VALUE))
        );

        jPanel17.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel17.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel17.border.titleFont"))); // NOI18N
        jPanel17.setName("jPanel17"); // NOI18N
        jPanel17.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        btnAgregarCons.setAction(actionMap.get("agregarConsultorio")); // NOI18N
        btnAgregarCons.setText(resourceMap.getString("btnAgregarCons.text")); // NOI18N
        btnAgregarCons.setName("btnAgregarCons"); // NOI18N
        jPanel17.add(btnAgregarCons, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 30, -1, 30));

        btnEliminarCons.setAction(actionMap.get("eliminarConsultorio")); // NOI18N
        btnEliminarCons.setText(resourceMap.getString("btnEliminarCons.text")); // NOI18N
        btnEliminarCons.setName("btnEliminarCons"); // NOI18N
        jPanel17.add(btnEliminarCons, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 70, -1, 30));

        btnGuardarCons.setAction(actionMap.get("guardarConsultorio")); // NOI18N
        btnGuardarCons.setText(resourceMap.getString("btnGuardarCons.text")); // NOI18N
        btnGuardarCons.setName("btnGuardarCons"); // NOI18N
        jPanel17.add(btnGuardarCons, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, 110, 120, 30));

        btnRefreshCons.setAction(actionMap.get("refrescarConsultorios")); // NOI18N
        btnRefreshCons.setText(resourceMap.getString("btnRefreshCons.text")); // NOI18N
        btnRefreshCons.setName("btnRefreshCons"); // NOI18N
        jPanel17.add(btnRefreshCons, new org.netbeans.lib.awtextra.AbsoluteConstraints(40, 150, 70, 30));

        jpDatosConsult.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpDatosConsult.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpDatosConsult.border.titleFont"))); // NOI18N
        jpDatosConsult.setName("jpDatosConsult"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        cboClinicasCons.setName("cboClinicasCons"); // NOI18N
        cboClinicasCons.setRenderer(rendererClinicas1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listClinicas2, cboClinicasCons);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtConsultorios, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.clinicas}"), cboClinicasCons, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        binding.setSourceNullValue(null);
        binding.setSourceUnreadableValue(null);
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout jpDatosConsultLayout = new javax.swing.GroupLayout(jpDatosConsult);
        jpDatosConsult.setLayout(jpDatosConsultLayout);
        jpDatosConsultLayout.setHorizontalGroup(
            jpDatosConsultLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosConsultLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel7)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(cboClinicasCons, javax.swing.GroupLayout.PREFERRED_SIZE, 173, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(32, Short.MAX_VALUE))
        );
        jpDatosConsultLayout.setVerticalGroup(
            jpDatosConsultLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosConsultLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addGroup(jpDatosConsultLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(cboClinicasCons, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(28, Short.MAX_VALUE))
        );

        jLabel29.setIcon(null);
        jLabel29.setName("jLabel29"); // NOI18N

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jpConsultorios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jpDatosConsult, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(85, 85, 85)
                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                .addContainerGap(792, Short.MAX_VALUE)
                .addComponent(jLabel29)
                .addContainerGap())
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jpConsultorios, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jpDatosConsult, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, 195, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 115, Short.MAX_VALUE)
                .addComponent(jLabel29)
                .addContainerGap())
        );

        jTabbedPane3.addTab(resourceMap.getString("jPanel16.TabConstraints.tabTitle"), jPanel16); // NOI18N

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 839, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 471, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel18.setName("jPanel18"); // NOI18N

        jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel19.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel19.border.titleFont"))); // NOI18N
        jPanel19.setName("jPanel19"); // NOI18N

        jScrollPane7.setName("jScrollPane7"); // NOI18N

        jtMedicos.setName("jtMedicos"); // NOI18N

        jTableBinding = org.jdesktop.swingbinding.SwingBindings.createJTableBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, medicosList, jtMedicos);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${nombre}"));
        columnBinding.setColumnName("Nombre");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${apm}"));
        columnBinding.setColumnName("Apm");
        columnBinding.setColumnClass(String.class);
        columnBinding = jTableBinding.addColumnBinding(org.jdesktop.beansbinding.ELProperty.create("${app}"));
        columnBinding.setColumnName("App");
        columnBinding.setColumnClass(String.class);
        bindingGroup.addBinding(jTableBinding);
        jTableBinding.bind();
        jScrollPane7.setViewportView(jtMedicos);

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 464, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                .addContainerGap())
        );

        jpDatosMedicos.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jpDatosMedicos.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jpDatosMedicos.border.titleFont"))); // NOI18N
        jpDatosMedicos.setName("jpDatosMedicos"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        txtEspecialidad.setName("txtEspecialidad"); // NOI18N

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtMedicos, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.especialidad}"), txtEspecialidad, org.jdesktop.beansbinding.BeanProperty.create("text"));
        bindingGroup.addBinding(binding);

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jComboBox1.setName("jComboBox1"); // NOI18N
        jComboBox1.setRenderer(renderConsultorios1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listConsultorios, jComboBox1);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtMedicos, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.consultorios}"), jComboBox1, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jComboBox2.setName("jComboBox2"); // NOI18N
        jComboBox2.setRenderer(renderTurnos1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, turnoList, jComboBox2);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jtMedicos, org.jdesktop.beansbinding.ELProperty.create("${selectedElement.turno}"), jComboBox2, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        bindingGroup.addBinding(binding);

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jComboBox3.setEnabled(false);
        jComboBox3.setName("jComboBox3"); // NOI18N
        jComboBox3.setRenderer(rendererClinicas1);

        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, listClinicas2, jComboBox3);
        bindingGroup.addBinding(jComboBoxBinding);
        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, jComboBox1, org.jdesktop.beansbinding.ELProperty.create("${selectedItem.clinicas}"), jComboBox3, org.jdesktop.beansbinding.BeanProperty.create("selectedItem"));
        binding.setSourceNullValue(null);
        binding.setSourceUnreadableValue(null);
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout jpDatosMedicosLayout = new javax.swing.GroupLayout(jpDatosMedicos);
        jpDatosMedicos.setLayout(jpDatosMedicosLayout);
        jpDatosMedicosLayout.setHorizontalGroup(
            jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosMedicosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpDatosMedicosLayout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txtEspecialidad, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpDatosMedicosLayout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addGap(36, 36, 36)
                        .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jpDatosMedicosLayout.createSequentialGroup()
                        .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel9)
                            .addComponent(jLabel11))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(58, Short.MAX_VALUE))
        );
        jpDatosMedicosLayout.setVerticalGroup(
            jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpDatosMedicosLayout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(txtEspecialidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(26, 26, 26)
                .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
                .addGroup(jpDatosMedicosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(jComboBox3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30))
        );

        jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel20.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel20.border.titleFont"))); // NOI18N
        jPanel20.setName("jPanel20"); // NOI18N

        btnAgregarMedico.setAction(actionMap.get("agregarMedico")); // NOI18N
        btnAgregarMedico.setText(resourceMap.getString("btnAgregarMedico.text")); // NOI18N
        btnAgregarMedico.setName("btnAgregarMedico"); // NOI18N

        btnEliminarMedico.setAction(actionMap.get("eliminarMedico")); // NOI18N
        btnEliminarMedico.setText(resourceMap.getString("btnEliminarMedico.text")); // NOI18N
        btnEliminarMedico.setName("btnEliminarMedico"); // NOI18N

        jButton7.setAction(actionMap.get("guardarMedico")); // NOI18N
        jButton7.setText(resourceMap.getString("jButton7.text")); // NOI18N
        jButton7.setName("jButton7"); // NOI18N

        btnRefreshMedico.setAction(actionMap.get("refreshMedicos")); // NOI18N
        btnRefreshMedico.setText(resourceMap.getString("btnRefreshMedico.text")); // NOI18N
        btnRefreshMedico.setName("btnRefreshMedico"); // NOI18N

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addGap(47, 47, 47)
                        .addComponent(jButton7))
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addGap(63, 63, 63)
                        .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btnAgregarMedico)
                            .addComponent(btnEliminarMedico)))
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addGap(63, 63, 63)
                        .addComponent(btnRefreshMedico)))
                .addContainerGap(32, Short.MAX_VALUE))
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(btnAgregarMedico)
                .addGap(18, 18, 18)
                .addComponent(btnEliminarMedico)
                .addGap(18, 18, 18)
                .addComponent(jButton7)
                .addGap(18, 18, 18)
                .addComponent(btnRefreshMedico)
                .addContainerGap(44, Short.MAX_VALUE))
        );

        jLabel30.setIcon(null);
        jLabel30.setName("jLabel30"); // NOI18N

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGap(98, 98, 98)
                        .addComponent(jpDatosMedicos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(100, 100, 100)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jLabel30)
                        .addContainerGap())))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jpDatosMedicos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGap(115, 115, 115)
                        .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(16, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                .addContainerGap(428, Short.MAX_VALUE)
                .addComponent(jLabel30)
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel18.TabConstraints.tabTitle"), jPanel18); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 844, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 499, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void cboPacientesItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboPacientesItemStateChanged
          idPaciente = evt.getItem().toString();
          idPaciente = idPaciente.substring(idPaciente.indexOf('=')+1,idPaciente.indexOf(']'));
          //JOptionPane.showMessageDialog(null, idPaciente);
    }//GEN-LAST:event_cboPacientesItemStateChanged

    private void cboClinicaCitaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboClinicaCitaItemStateChanged
        // TODO add your handling code here:
        idCC = evt.getItem().toString();
        idCC = idCC.substring(idCC.indexOf('=')+1,idCC.indexOf(']'));
        //llenarConsultorios(idCC);
    }//GEN-LAST:event_cboClinicaCitaItemStateChanged

    private void txtEdadKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtEdadKeyTyped
        /*int k=(int)evt.getKeyChar();
        if (k >= 97 && k <= 122 || k>=65 && k<=90){
        evt.setKeyChar((char)KeyEvent.VK_CLEAR);
        //JOptionPane.showMessageDialog(null,"No puede ingresar letras!!!","Ventana Error Datos",JOptionPane.ERROR_MESSAGE);
        }
        if(k==241 || k==209){
        evt.setKeyChar((char)KeyEvent.VK_CLEAR);
        //JOptionPane.showMessageDialog(null,"No puede ingresar letras!!!","Ventana Error Datos",JOptionPane.ERROR_MESSAGE);
        }
        if(k==10){
         txtEdad.transferFocus();
        }*/
    }//GEN-LAST:event_txtEdadKeyTyped

    private void btnAgregarCitaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAgregarCitaActionPerformed
        Acciones_Imss ac = new Acciones_Imss();
        ac.insertarCita(idPaciente,jDateChooser3.getDate(),jTextFieldDateEditor3.getDate(), jtaObservaciones.getText(), Integer.parseInt(idCC), Integer.parseInt(idConC));
        refreshTablaCitas();
    }//GEN-LAST:event_btnAgregarCitaActionPerformed

    private void cboConsultorioCitaItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboConsultorioCitaItemStateChanged
          idConC = evt.getItem().toString();
          idConC = idConC.substring(idConC.indexOf('=')+1,idConC.indexOf(']'));
          //JOptionPane.showMessageDialog(null, idPaciente);
    }//GEN-LAST:event_cboConsultorioCitaItemStateChanged

    ////////////////////////AGREGAR/////////////////////////////////////7
    @Action
    public void registrarPaciente()
    {
        try {
        Pacientes nuevoPaciente = new Pacientes();
        emImss.persist(nuevoPaciente);
        listPacientes.add(nuevoPaciente);
        int fila = listPacientes.size() - 1;
        jtPacientes.setRowSelectionInterval(fila, fila);
        jtPacientes.scrollRectToVisible(jtPacientes.getCellRect(fila, 0, true));
        setNecesitaGuardar(true);
        }
        catch (Exception e) {
        JOptionPane.showMessageDialog(null, e.getMessage());
        setNecesitaGuardar(false);
        }
    }
    //////////////////////CLINICAS////////////////////////////////////////////////
    @Action
    public void agregarClinica()
    {
        try {
        Clinicas nuevaClinica = new Clinicas();
        emImss.persist(nuevaClinica);
        listClinicas2.add(nuevaClinica);
        int fila = listClinicas2.size() - 1;
        jtClinicas.setRowSelectionInterval(fila, fila);
        jtClinicas.scrollRectToVisible(jtClinicas.getCellRect(fila, 0, true));
        setNecesarioGuardarClinica(true);
        }
        catch (Exception e) {
        JOptionPane.showMessageDialog(null, e.getMessage());
        setNecesarioGuardarClinica(false);
        }

    }
    //////////////////////CONSULTORIOS////////////////////////////////////////////////
    @Action
    public void agregarConsultorio()
    {
        try {
        Consultorios nuevoConsul = new Consultorios();
        emImss.persist(nuevoConsul);
        listConsultorios.add(nuevoConsul);
        int fila = listConsultorios.size() - 1;
        jtConsultorios.setRowSelectionInterval(fila, fila);
        jtConsultorios.scrollRectToVisible(jtConsultorios.getCellRect(fila, 0, true));
        setNececitaGuardarConsultorio(true);
        }
        catch (Exception e) {
        JOptionPane.showMessageDialog(null, e.getMessage());
        setNececitaGuardarConsultorio(false);
        }
    }
    //////////////////////MEDICOS////////////////////////////////////////////////
     @Action
    public void agregarMedico()
    {
         try {
        Medicos nuevoMedico = new Medicos();
        emImss.persist(nuevoMedico);
        medicosList.add(nuevoMedico);
        int fila = medicosList.size() - 1;
        jtMedicos.setRowSelectionInterval(fila, fila);
        jtMedicos.scrollRectToVisible(jtMedicos.getCellRect(fila, 0, true));
        setNecesitaGuardarMedico(true);
        }
        catch (Exception e) {
        JOptionPane.showMessageDialog(null, e.getMessage());
        setNecesitaGuardarMedico(false);
        }
    }
    //////////////////////BORRAR/////////////////////////////////////////////77
    @Action(enabledProperty = "pacienteSeleccionado")
    public void eliminarPaciente()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion del Registro?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        int[] seleccionados = jtPacientes.getSelectedRows();
        List<Pacientes> eliminados = new ArrayList<Pacientes>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Pacientes paciente = listPacientes.get(jtPacientes.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(paciente);
            emImss.remove(paciente);
        }
        listPacientes.removeAll(eliminados);
        setNecesitaGuardar(true);
        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,e.getMessage());
        }
    }
    public boolean isPacienteSeleccionado()
    {
        return jtPacientes.getSelectedRow() != -1;
    }
    //////////////////////CITAS/////////////////////////////////////////////77
    @Action(enabledProperty = "citaSeleccionada")
    public void eliminarCita()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion de la Cita?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        int[] seleccionados = jtCitas.getSelectedRows();
        List<Citas> eliminados = new ArrayList<Citas>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Citas cita = listCitas.get(jtCitas.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(cita);
            emImss.remove(cita);
        }
        listCitas.removeAll(eliminados);
        setNecesitaGuardarCita(true);
        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,"Ocurrio un Error al Tratar de Borrar Vuelva a Intentar","Error",JOptionPane.ERROR_MESSAGE);
            refreshTablaCitas();
        }
    }
    public boolean isCitaSeleccionada() {
        return jtCitas.getSelectedRow() != -1;
    }
    //////////////////////CLINICAS/////////////////////////////////////////////77
   @Action(enabledProperty = "clinicaSeleccionada")
    public void eliminarClinica()
    {
       //emImss.clear();
       try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion de la Clinica?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        
        int[] seleccionados = jtClinicas.getSelectedRows();
        List<Clinicas> eliminados = new ArrayList<Clinicas>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Clinicas clinica = listClinicas2.get(jtClinicas.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(clinica);
            emImss.remove(clinica);
            
        }
        listClinicas2.removeAll(eliminados);
        setNecesarioGuardarClinica(true);

        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,"Ocurrio un Error al Tratar de Borrar Vuelva a Intentar","Error",JOptionPane.ERROR_MESSAGE);
            refreshTablaClinicas();
        }

    }
    public boolean isClinicaSeleccionada() {
        return jtClinicas.getSelectedRow() != -1;
    }
    //////////////////////CONSULTORIOS////////////////////////////////////////////////
    @Action(enabledProperty = "consultorioSeleccionado")
    public void eliminarConsultorio()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion del Consultorio?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {

        int[] seleccionados = jtConsultorios.getSelectedRows();
        List<Consultorios> eliminados = new ArrayList<Consultorios>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Consultorios consul = listConsultorios.get(jtConsultorios.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(consul);
            emImss.remove(consul);

        }
        listConsultorios.removeAll(eliminados);
        setNececitaGuardarConsultorio(true);

        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,"Ocurrio un Error al Tratar de Borrar Vuelva a Intentar","Error",JOptionPane.ERROR_MESSAGE);
            refreshTablaConsultorios();
        }
    }
    public boolean isConsultorioSeleccionado()
    {
        return jtConsultorios.getSelectedRow() != -1;
    }
    //////////////////////MEDICOS/////////////////////////////////////////////////////
    @Action(enabledProperty = "medicoSeleccionado")
    public void eliminarMedico()
    {
        try {
        int resp = JOptionPane.showConfirmDialog(null, "¿Confirmas la Eliminacion del Medico?","Aviso",
                JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null);
        if (resp == JOptionPane.YES_NO_OPTION)
        {
        int[] seleccionados = jtMedicos.getSelectedRows();
        List<Medicos> eliminados = new ArrayList<Medicos>(seleccionados.length);
        for (int i = 0; i < seleccionados.length; i++) {
            Medicos medico = medicosList.get(jtMedicos.convertRowIndexToModel(seleccionados[i]));
            eliminados.add(medico);
            emImss.remove(medico);

        }
        medicosList.removeAll(eliminados);
        setNecesitaGuardarMedico(true);

        }
        }
         catch(Exception e)
        {
            JOptionPane.showMessageDialog(null,"Ocurrio un Error al Tratar de Borrar Vuelva a Intentar","Error",JOptionPane.ERROR_MESSAGE);
            refreshTablaMedicos();
        }
    }
    public boolean isMedicoSeleccionado()
    {
        return jtMedicos.getSelectedRow() != -1;
    }
    /////******************GUARDAR*********************////////////////////////////7
    //////////////////////PACIENTES////////////////////////////////////////////////
    @Action(enabledProperty = "necesitaGuardar")
    public Task guardarRegistro()
    {
        return new GuardarRegistroTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarRegistroTask extends org.jdesktop.application.Task<Object, Void>
    {
        GuardarRegistroTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarRegistroTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
           try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emImss.getTransaction().commit();
              emImss.getTransaction().begin();
              n = true;
           }else{
               n=false;}
           }
           catch (RollbackException e)
           {
                emImss.getTransaction().begin();
                List<Pacientes> listaP = new ArrayList<Pacientes>(listPacientes.size());
                for(Pacientes paciente : listPacientes){
                    listaP.add(emImss.merge(paciente));
           }
           listPacientes.clear();
           listPacientes.addAll(listaP);
           }
           return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            if(n==true)
            {
            setNecesitaGuardar(false); refreshTablaCitas(); refreshTablaPacientes();}
            else
            {
                setNecesitaGuardar(true);}
        }
    }
    private boolean necesitaGuardar = false;
    public boolean isNecesitaGuardar() {
        return necesitaGuardar;
    }
    public void setNecesitaGuardar(boolean b) {
        boolean old = isNecesitaGuardar();
        this.necesitaGuardar = b;
        firePropertyChange("necesitaGuardar", old, isNecesitaGuardar());
    }
    //////////////////////CITAS////////////////////////////////////////////////
        @Action(enabledProperty = "necesitaGuardarCita")
    public Task guardarCambios() {
        return new GuardarCambiosTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarCambiosTask extends org.jdesktop.application.Task<Object, Void> {
        GuardarCambiosTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarCambiosTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emImss.getTransaction().commit();
              emImss.getTransaction().begin();
              n2 = true;
           }else{
               n2=false;}
           }
           catch (RollbackException e)
           {
                emImss.getTransaction().begin();
                List<Citas> listaC = new ArrayList<Citas>(listCitas.size());
                for(Citas cita : listCitas){
                    listaC.add(emImss.merge(cita));
           }
           listCitas.clear();
           listCitas.addAll(listaC);
           }
           return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            if(n2==true)
            {
                setNecesitaGuardarCita(false);}
            else
            {
                setNecesitaGuardarCita(true);}
        }
    }
    private boolean necesitaGuardarCita = false;
    public boolean isNecesitaGuardarCita() {
        return necesitaGuardarCita;
    }
    public void setNecesitaGuardarCita(boolean b) {
        boolean old = isNecesitaGuardarCita();
        this.necesitaGuardarCita = b;
        firePropertyChange("necesitaGuardarCita", old, isNecesitaGuardarCita());
    }
    //////////////////////CLINICAS/////////////////////////////////////////////77
    @Action(enabledProperty = "necesarioGuardarClinica")
    public Task guardarClinica() {
        return new GuardarClinicaTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarClinicaTask extends org.jdesktop.application.Task<Object, Void> {
        GuardarClinicaTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarClinicaTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emImss.getTransaction().commit();
              emImss.getTransaction().begin();
              refreshTablaMedicos();
              refreshTablaConsultorios();
              refreshTablaCitas();
              n3 = true;
           }else{
               n3=false;}
           }
           catch (RollbackException e)
           {
                emImss.getTransaction().begin();
                List<Clinicas> listaC = new ArrayList<Clinicas>(listClinicas2.size());
                for(Clinicas clinica : listClinicas2){
                    listaC.add(emImss.merge(clinica));
           }
           listClinicas2.clear();
           listClinicas2.addAll(listaC);
           }
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            if(n3==true)
            {
                setNecesarioGuardarClinica(false);}
            else
            {
                setNecesarioGuardarClinica(true);}
        }
    }
    private boolean necesarioGuardarClinica = false;
    public boolean isNecesarioGuardarClinica() {
        return necesarioGuardarClinica;
    }
    public void setNecesarioGuardarClinica(boolean b) {
        boolean old = isNecesarioGuardarClinica();
        this.necesarioGuardarClinica = b;
        firePropertyChange("necesarioGuardarClinica", old, isNecesarioGuardarClinica());
    }
    //////////////////////CONSULTORIOS////////////////////////////////////////////////
    @Action(enabledProperty = "nececitaGuardarConsultorio")
    public Task guardarConsultorio()
    {
        return new GuardarConsultorioTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarConsultorioTask extends org.jdesktop.application.Task<Object, Void> {
        GuardarConsultorioTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarConsultorioTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emImss.getTransaction().commit();
              emImss.getTransaction().begin();
              refreshTablaClinicas();
              refreshTablaMedicos();
              refreshTablaCitas();
              n4 = true;
           }else{
               n4=false;}
           }
           catch (RollbackException e)
           {
                emImss.getTransaction().begin();
                List<Consultorios> listaC = new ArrayList<Consultorios>(listConsultorios.size());
                for(Consultorios consul : listConsultorios){
                    listaC.add(emImss.merge(consul));
           }
           listConsultorios.clear();
           listConsultorios.addAll(listaC);
           }
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            if(n4==true)
            {
                setNececitaGuardarConsultorio(false);}
            else
            {
                setNececitaGuardarConsultorio(true);}
        }
      
    }
    private boolean nececitaGuardarConsultorio = false;
    public boolean isNececitaGuardarConsultorio() {
        return nececitaGuardarConsultorio;
    }
    public void setNececitaGuardarConsultorio(boolean b) {
        boolean old = isNececitaGuardarConsultorio();
        this.nececitaGuardarConsultorio = b;
        firePropertyChange("nececitaGuardarConsultorio", old, isNececitaGuardarConsultorio());
    }
    //////////////////////MEDICOS////////////////////////////////////////////////
    @Action(enabledProperty = "necesitaGuardarMedico")
    public Task guardarMedico()
    {
        return new GuardarMedicoTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class GuardarMedicoTask extends org.jdesktop.application.Task<Object, Void> {
        GuardarMedicoTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to GuardarMedicoTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            try {
           int resp = JOptionPane.showConfirmDialog(null, "¿Guardar Cambios?","Aviso",
           JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,null);
           if (resp == JOptionPane.YES_NO_OPTION)
           {
              emImss.getTransaction().commit();
              emImss.getTransaction().begin();
              refreshTablaCitas();
              refreshTablaConsultorios();
              n5 = true;
           }else{
               n5=false;}
           }
           catch (RollbackException e)
           {
                emImss.getTransaction().begin();
                List<Medicos> listaM = new ArrayList<Medicos>(medicosList.size());
                for(Medicos medico : medicosList){
                    listaM.add(emImss.merge(medico));
           }
           medicosList.clear();
           medicosList.addAll(listaM);
           }
            return null;
        }
        @Override protected void succeeded(Object result) {
            if(n5==true)
            {
                setNecesitaGuardarMedico(false);}
            else
            {
                setNecesitaGuardarMedico(true);}
        }
    }
    private boolean necesitaGuardarMedico = false;
    public boolean isNecesitaGuardarMedico() {
        return necesitaGuardarMedico;
    }
    public void setNecesitaGuardarMedico(boolean b) {
        boolean old = isNecesitaGuardarMedico();
        this.necesitaGuardarMedico = b;
        firePropertyChange("necesitaGuardarMedico", old, isNecesitaGuardarMedico());
    }
    ////////*******************/////ACTUALIZAR////////////////*******************/////////7
    //////////////////////PACIENTES////////////////////////////////////////////////
    @Action
    public Task actualizarDatos()
    {
        return new ActualizarDatosTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class ActualizarDatosTask extends org.jdesktop.application.Task<Object, Void>
    {
        ActualizarDatosTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to ActualizarDatosTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Pacientes> listaP = queryPacientes.getResultList();
            for(Pacientes paciente : listaP){
                emImss.refresh(paciente);
            }
            listPacientes.clear();
            listPacientes.addAll(listaP);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            setNecesitaGuardar(false);
        }
    }
    //////////////////////CITAS////////////////////////////////////////////////
    @Action
    public Task actualizarDatosCita() {
        return new ActualizarDatosCitaTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class ActualizarDatosCitaTask extends org.jdesktop.application.Task<Object, Void> {
        ActualizarDatosCitaTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to ActualizarDatosCitaTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Citas> listaC = queryCitas.getResultList();
            for(Citas cita : listaC){
                emImss.refresh(cita);
            }
            listCitas.clear();
            listCitas.addAll(listaC);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result)
        {
            setNecesitaGuardarCita(false);
        }
    }
    //////////////////////CLINICAS/////////////////////////////////////////////77
     @Action
    public Task refreshClinicas() {
        return new RefreshClinicasTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class RefreshClinicasTask extends org.jdesktop.application.Task<Object, Void> {
        RefreshClinicasTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to RefreshClinicasTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Clinicas> listaC = queryClinicas2.getResultList();
            for(Clinicas clinica : listaC){
                emImss.refresh(clinica);
            }
            listClinicas2.clear();
            listClinicas2.addAll(listaC);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            setNecesarioGuardarClinica(false);}
        }
    //////////////////////CONSULTORIOS////////////////////////////////////////////////
     @Action
    public Task refrescarConsultorios() {
        return new RefrescarConsultoriosTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class RefrescarConsultoriosTask extends org.jdesktop.application.Task<Object, Void> {
        RefrescarConsultoriosTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to RefrescarConsultoriosTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Consultorios> listaC = queryConsultorios.getResultList();
            for(Consultorios consul : listaC){
                emImss.refresh(consul);
            }
            listConsultorios.clear();
            listConsultorios.addAll(listaC);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
            setNececitaGuardarConsultorio(false);
        }
    }
    //////////////////////MEDICOS////////////////////////////////////////////////
    @Action
    public Task refreshMedicos()
    {
        return new RefreshMedicosTask(org.jdesktop.application.Application.getInstance(db_proyect.Db_proyectApp.class));
    }
    private class RefreshMedicosTask extends org.jdesktop.application.Task<Object, Void> {
        RefreshMedicosTask(org.jdesktop.application.Application app) {
            // Runs on the EDT.  Copy GUI state that
            // doInBackground() depends on from parameters
            // to RefreshMedicosTask fields, here.
            super(app);
        }
        @Override protected Object doInBackground() {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Medicos> listaM = medicosQuery.getResultList();
            for(Medicos medico : listaM){
                emImss.refresh(medico);
            }
            medicosList.clear();
            medicosList.addAll(listaM);
            return null;  // return your result
        }
        @Override protected void succeeded(Object result) {
           setNecesitaGuardarMedico(false);
        }
    }
    ///////////////////LISTENER PARA BOTONES//////////////////////////////////////////////
    private void initListenersPaciente()
    {
        jtPacientes.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("pacienteSeleccionado", !isPacienteSeleccionado(), isPacienteSeleccionado());
                jPanel5.setVisible((jtPacientes.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesitaGuardar(true);
                        
            }
        });
    }
    private void initListenersCita()
    {
        jtCitas.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("citaSeleccionada", !isCitaSeleccionada(), isCitaSeleccionada());
                jPanel13.setVisible((jtCitas.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesitaGuardarCita(true);
            }
        });
    }
    private void initListenersClinica()
    {
        jtClinicas.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("clinicaSeleccionada", !isClinicaSeleccionada(), isClinicaSeleccionada());

            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesarioGuardarClinica(true);
            }
        });
    }
    private void initListenersConsultorios()
    {
        jtConsultorios.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("consultorioSeleccionado", !isConsultorioSeleccionado(), isConsultorioSeleccionado());
                jpDatosConsult.setVisible((jtConsultorios.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNececitaGuardarConsultorio(true);
            }
        });
    }
    private void initListenersMedicos()
    {
        jtMedicos.getSelectionModel().addListSelectionListener(new ListSelectionListener()
        {
            public void valueChanged(ListSelectionEvent e)
            {
                firePropertyChange("medicoSeleccionado", !isMedicoSeleccionado(), isMedicoSeleccionado());
                jpDatosMedicos.setVisible((jtMedicos.getSelectedRowCount() == 1) ? true : false);
            }
        });
        bindingGroup.addBindingListener(new AbstractBindingListener()
        {
            @Override
            public void targetChanged(Binding binding, PropertyStateEvent event)
            {
               setNecesitaGuardarMedico(true);
            }
        });
    }
    //////////////////////METODOS////////////////////////////////////////////////
    private void validadorNumeros(JTextField jtf)
    {
        jtf.addKeyListener(new KeyAdapter() {
        public void keyTyped(KeyEvent e) {
        char c = e.getKeyChar();
        if (!(Character.isDigit(c) ||
        (c == KeyEvent.VK_BACK_SPACE) ||
        (c == KeyEvent.VK_DELETE))) {
        getToolkit().beep();
        e.consume();
        }
        }
        });
    }
    private void panelesVisibles()
    {
        jPanel5.setVisible(false);
        jPanel13.setVisible(false);
        jpDatosConsult.setVisible(false);
        jpDatosMedicos.setVisible(false);
    }
    private void botonesHabilitados()
    {
        setNecesitaGuardar(false);
        setNecesitaGuardarCita(false);
        setNecesarioGuardarClinica(false);
        setNececitaGuardarConsultorio(false);
        setNecesitaGuardarMedico(false);
    }
    private void comboboxIndex()
    {
        jcbGenero.setSelectedIndex(-1);
        cboClinicaCita.setSelectedIndex(-1);
        cboConsultorioCita.setSelectedIndex(-1);
        cboClinica.setSelectedIndex(-1);
        cboPacienteReg.setSelectedIndex(-1);
        cboMedicosMod.setSelectedIndex(-1);
        cboMedicos.setSelectedIndex(-1);
        cboClinicaMod.setSelectedIndex(-1);
        cboConsMod.setSelectedIndex(-1);
        cboMedicosMod.setSelectedIndex(-1);
        cboPacientes.setSelectedIndex(-1);
        jComboBox1.setSelectedIndex(-1);
        jComboBox2.setSelectedIndex(-1);
    }
    public void refreshTablaCitas()
    {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Citas> listaC = queryCitas.getResultList();
            for(Citas cita : listaC){
                emImss.refresh(cita);
            }
            listCitas.clear();
            listCitas.addAll(listaC);
            setNecesitaGuardarCita(false);
    }
    private void refreshTablaClinicas()
    {
             emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Clinicas> listaC = queryClinicas2.getResultList();
            for(Clinicas clinica : listaC){
                emImss.refresh(clinica);
            }
            listClinicas2.clear();
            listClinicas2.addAll(listaC);
            setNecesarioGuardarClinica(false);
    }
    private void refreshTablaConsultorios()
    {
             emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Consultorios> listaC = queryConsultorios.getResultList();
            for(Consultorios consul : listaC){
                emImss.refresh(consul);
            }
            listConsultorios.clear();
            listConsultorios.addAll(listaC);
            setNececitaGuardarConsultorio(false);
    }
    private void refreshTablaMedicos()
    {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Medicos> listaM = medicosQuery.getResultList();
            for(Medicos medico : listaM){
                emImss.refresh(medico);
            }
            medicosList.clear();
            medicosList.addAll(listaM);
            setNececitaGuardarConsultorio(false);
    }
    private void refreshTablaPacientes()
    {
            emImss.getTransaction().rollback();
            emImss.getTransaction().begin();
            List<Pacientes> listaM = queryPacientes.getResultList();
            for(Pacientes pac : listaM){
                emImss.refresh(pac);
            }
            listPacientes.clear();
            listPacientes.addAll(listaM);
            setNecesitaGuardar(false);
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnActualizar;
    private javax.swing.JButton btnAgregarCita;
    private javax.swing.JButton btnAgregarClinica;
    private javax.swing.JButton btnAgregarCons;
    private javax.swing.JButton btnAgregarMedico;
    private javax.swing.JButton btnEliminarCita;
    private javax.swing.JButton btnEliminarClinica;
    private javax.swing.JButton btnEliminarCons;
    private javax.swing.JButton btnEliminarMedico;
    private javax.swing.JButton btnGCambCitas;
    private javax.swing.JButton btnGuardarCons;
    private javax.swing.JButton btnRCamCitas;
    private javax.swing.JButton btnRefreshClinicas;
    private javax.swing.JButton btnRefreshCons;
    private javax.swing.JButton btnRefreshMedico;
    private javax.swing.JComboBox cboClinica;
    private javax.swing.JComboBox cboClinicaCita;
    private javax.swing.JComboBox cboClinicaMod;
    private javax.swing.JComboBox cboClinicasCons;
    private javax.swing.JComboBox cboConsMod;
    private javax.swing.JComboBox cboConsultorioCita;
    private javax.swing.JComboBox cboMedicos;
    private javax.swing.JComboBox cboMedicosMod;
    private javax.swing.JComboBox cboPacienteReg;
    private javax.swing.JComboBox cboPacientes;
    private java.util.List<Clinicas> clinicasList;
    private javax.persistence.Query clinicasQuery;
    private bd_imss.Consultorios consultorios1;
    private java.util.List<bd_imss.Consultorios> consultoriosList;
    private javax.persistence.Query consultoriosQuery;
    private javax.persistence.EntityManager db_proyect_pruebasPUEntityManager;
    private javax.persistence.EntityManager emImss;
    private java.util.List<bd_imss.Generos> generosList;
    private javax.persistence.Query generosQuery;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton7;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JComboBox jComboBox2;
    private javax.swing.JComboBox jComboBox3;
    private com.toedter.calendar.JDateChooser jDateChooser3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTabbedPane jTabbedPane3;
    private com.toedter.calendar.JTextFieldDateEditor jTextFieldDateEditor3;
    private javax.swing.JComboBox jcbGenero;
    private com.toedter.calendar.JDateChooser jdcFechaCita;
    private com.toedter.calendar.JDateChooser jdcFechaIng;
    private com.toedter.calendar.JDateChooser jdcFechaNac;
    private javax.swing.JPanel jpAccionesClinicas;
    private javax.swing.JPanel jpClinicas;
    private javax.swing.JPanel jpConsultorios;
    private javax.swing.JPanel jpDatosConsult;
    private javax.swing.JPanel jpDatosMedicos;
    private javax.swing.JTable jtCitas;
    private javax.swing.JTable jtClinicas;
    private javax.swing.JTable jtConsultorios;
    private javax.swing.JTable jtMedicos;
    private javax.swing.JTable jtPacientes;
    private javax.swing.JTextArea jtaObservaciones;
    private java.util.List<Citas> listCitas;
    private java.util.List<Clinicas> listClinicas2;
    private java.util.List<Consultorios> listConsultorios;
    private java.util.List<Pacientes> listPacientes;
    private bd_imss.Medicos medicos1;
    private java.util.List<Medicos> medicosList;
    private javax.persistence.Query medicosQuery;
    private bd_imss.Pacientes pacientes1;
    private javax.persistence.Query queryCitas;
    private javax.persistence.Query queryClinicas2;
    private javax.persistence.Query queryConsultorios;
    private javax.persistence.Query queryPacientes;
    private Utilidades.RenderConsultorios renderConsultorios1;
    private Utilidades.RenderGeneros renderGeneros1;
    private Utilidades.RenderMedicos renderMedicos1;
    private Utilidades.RenderPacientes renderPacientes1;
    private Utilidades.RenderTurnos renderTurnos1;
    private Utilidades.RendererClinicas rendererClinicas1;
    private com.toedter.calendar.JTextFieldDateEditor tfdHoraCita;
    private java.util.List<bd_imss.Turno> turnoList;
    private javax.persistence.Query turnoQuery;
    private javax.swing.JTextArea txtAObs;
    private javax.swing.JTextField txtEdad;
    private javax.swing.JTextField txtEspecialidad;
    private javax.swing.JTextField txtTelefono;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
